package com.gsc.demo.test;

/**
 * file description
 * Created by 72038967 on 2019/8/13.
 */

import com.alibaba.druid.filter.config.ConfigTools;
public class Des {
    //加密
    public static String Encrypt(String str){
        String encryptPwd = "";
        try {
            encryptPwd = ConfigTools.encrypt(str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return  encryptPwd;
    }

    //解密
    public static String Decrypt(String str){
        String decryptPwd = "";
        try {
            decryptPwd = ConfigTools.decrypt(str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return new String(decryptPwd);
    }
}